package cn.zwx.goods.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;
import org.apache.dubbo.apidocs.annotations.ResponseProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zhangwenxue
 */
@Data
public class InsertCategoryDTO {

    /**
     * 分类名称
     */
    @NotBlank(message = "分类名称id")
    @Length(max = 32,message = "分类名称长度不能低于32位")
    @RequestParam(value = "分类名称",description = "分类名称",required = true)
    private String name;

    /**
     * 排序
     */
    @NotNull(message = "排布不能为空")
    @RequestParam(value = "排序",description = "排布",required = true)
    private Integer sort;

    /**
     * 上级ID
     */
    @NotNull(message = "上级ID不能为空")
    @RequestParam(value = "上级ID",description = "上级ID",required = true)
    private Integer parentId;

    @RequestParam(value = "[]",description = "类目属性信息")
    private List<Integer> attrIdList;
}
